package com.jstorm.count.service.signal.Impl;

import com.jstorm.count.mapper.commonroad.CommonroadMapper;
import com.jstorm.count.mapper.signal.SignalMapper;
import com.jstorm.count.service.commonroad.CommonroadService;
import com.jstorm.count.service.signal.SignalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @ProjectName: common
 * @Package: com.jstorm.count.service.network.Impl
 * @ClassName: NetworkServiceImpl
 * @Description:
 * @Author: Mr_hu
 * @CreateDate: 2018/12/28 18:39
 * ***********************************************************
 * @UpdateUser: Mr_hu
 * @UpdateDate: 2018/12/28 18:39
 * @UpdateRemark: The modified content
 * @Version: 1.0
 * ***********************************************************
 * Copyright: Copyright (c) 2018
 **/
@Service
public class SianalServiceImpl implements SignalService {



    @Autowired
    @SuppressWarnings("all")
    private SignalMapper signalMapper;

    /**
     * 查数据包下所有数据
     * @return
     */
    @Override
    public List<Map<String, Object>> selectNumber() {
        List<Map<String, Object>> signal = signalMapper.selectSignalCount();
        if (signal == null){
            throw new RuntimeException("Service层数量查询为空!");
        }

        return signal;
    }

    /**
     * 总数
     * @return
     */
    @Override
    public List<Map<String, Object>> selectTotal(){
        List<Map<String, Object>>  signalTotal = signalMapper.selectSignalTotal();
        if (signalTotal == null){
            throw new RuntimeException("Service层总数查询为空!");
        }

        return signalTotal;
    }


}
